package com.huike.web.controller.business;

import com.huike.business.domain.TbBusiness;
import com.huike.business.domain.TbBusinessTrackRecord;
import com.huike.business.domain.vo.BusinessTrackPluesVo;
import com.huike.business.domain.vo.BusinessTrackVo;
import com.huike.business.service.ITbBusinessTrackRecordService;
import com.huike.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import com.huike.common.core.controller.BaseController;

import java.util.List;

/**
 * 商机跟进记录Controller
 *
 * @date 2021-04-28
 */
@RestController
@RequestMapping("/business/record")
public class TbBusinessTrackRecordController extends BaseController {

    @Autowired
    ITbBusinessTrackRecordService itbBusinessTrackRecordService;


    /*商机跟进记录列表*/
    @GetMapping("/list")
    public AjaxResult list(Long businessId) {
        List<TbBusinessTrackRecord> list = itbBusinessTrackRecordService.list(businessId);
        return AjaxResult.success(list);
    }

    /*新增商机跟进记录*/
    @PostMapping()
    public AjaxResult updateIncrease(@RequestBody BusinessTrackPluesVo businessTrackPluesVo) {
        itbBusinessTrackRecordService.updateIncrease(businessTrackPluesVo);
        return AjaxResult.success();
    }

}
